package lanqiao13;

import java.math.BigInteger;
import java.util.Scanner;

public class G {
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		
		BigInteger num1 = new BigInteger("10");
		num1 = num1.pow(2 * n + 2);
//		System.out.println(num1);
		num1 = num1.subtract(new BigInteger("100"));
//		System.out.println(num1);
		num1 = num1.divide(new BigInteger("99"));
//		System.out.println(num1);
		
		BigInteger num2 = new BigInteger("10");
		num2 = num2.pow(n);
		num2 = num2.subtract(new BigInteger("1"));
		num2 = num2.multiply(new BigInteger("20"));
		num2 = num2.divide(new BigInteger("9"));
		BigInteger num3 = new BigInteger("" + n);
//		System.out.println(num1);
		System.out.println(num1.subtract(num2).add(num3).multiply(new BigInteger("4")).divide(new BigInteger("9")));
	}
	
	
}
